Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛(tests) more stable tests #22

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

🐛(tests) more stable tests #22

wants to merge 5 commits into from

Conversation

SergioSim
Copy link
Collaborator

Purpose

The js_input_response_spec.js test occasionally fails when it tries to access an iframe that has not yet been properly initialized.
The drag_and_drop_spec.js test always fails on a second run because it preserves its previous state.

We also updated the circle ci machine image to stay up to date and added entries to .gitignore and .eslintignore to ease switching between the dev and feature branches.

Proposal

  • js_input_response_spec.js - wait for the iframe to initialize
  • drag_and_drop_spec.js - reset the problem before each attempt

When bootstraping this project in the dev branch two additional
directories are created: edx/src and edx/modules.
To ease switching between a feature branch and the dev branch we
choose to ignore the edx/modules directory.
When bootstraping this project in the dev branch two additional
directories are created: edx/src and edx/modules.
To ease switching between a feature branch and the dev branch we
choose to make the linter ignore the edx directory.
To keep the circleci machine up to date.
Comment on lines +91 to +94
command: make bootstrap run-edx
- run:
name: Run e2e tests
command: make run-edx test
command: make test
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand why you changed the commands

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The idea was to group together similar tasks.
Currently, in the bootstrap ci step, we start all services except the edX CMS and then in the test step, we start the CMS and run the tests.
Thus, I suggest starting all services in the bootstrap CI step and only running the tests in the test CI step.
WDYT?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed I think it's a good idea 👍

Copy link
Contributor

@jmaupetit jmaupetit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See #23 comments. Sorry for mixing up reviews.

@SergioSim SergioSim force-pushed the more-stable-tests branch 4 times, most recently from 93a9f6e to d152577 Compare November 15, 2022 15:41
The iframe in the js_input_response test needs some time to become
interactive. Therefore we disable chromeWebSecurity to give cypress
access to the cross-domain iframe to check whether the iframe is ready
or not.
The drag_and_drop test relies on the problem beeing at it's initial
state.
However, edX preserves the state of the problem once it's submitted.
Therefore we reset the drag_and_drop problem before answering it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants